package com.zhaoxi.boot.demo.bootlesson1;

import com.zhaoxi.boot.demo.bootlesson1.service.BeanService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class BootLesson1Application {

    public static void main(String[] args) {

        ConfigurableApplicationContext context = SpringApplication.run(BootLesson1Application.class, args);
        BeanService bean1 = context.getBean("bean1", BeanService.class);
        System.out.println(bean1);
    }

}
